﻿<Page x:Class="WpfAnimation.PageAnimationBehavior"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="309" d:DesignWidth="786"
	Title="PageAnimationBehavior">

    <Canvas>
        <Button Canvas.Left="49" Canvas.Top="52" Content="Button" Height="23" Name="button1" Width="75" >
            <Button.Triggers>
                <EventTrigger RoutedEvent="Button.Click">
                    <BeginStoryboard >
                        <Storyboard>
                            <DoubleAnimation From="50" To="200" Storyboard.TargetProperty="(Canvas.Left)"  CurrentStateInvalidated="DoubleAnimation_CurrentStateInvalidated"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Button.Triggers>
        </Button>
    </Canvas>
</Page>
